package com.bestcem.xm.label.grpc.service.param.labelgroup;

import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import static com.bestcem.xm.label.constant.Constants.TAG_GROUP_NAME_MAX_LEN;

/**
 * @Description grpc 创建标签组调用参数对象 @Author dc.wang <dc.wang@idiaoyan.com> @Date 2021/5/18 @Version
 * V1.0
 */
@Getter
@Setter
@ToString
public class CreateLabelGroupParam {

  @NotBlank(message = "企业标识为空！")
  @Pattern(regexp = RegTypes.OBJECT_ID, message = "企业标识异常！")
  private String orgId;

  @NotBlank(message = "新建标签组名不能为空！")
  @Size(max = TAG_GROUP_NAME_MAX_LEN, message = "新建标签组名长度不能超过30！")
  private String name;

  @NotNull(message = "标签组序号不存在！")
  private int serial;

  @NotNull(message = "标签组联系人类型不存在！")
  private int attribute;
}
